import { createMemoryHistory, createRouter } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'

const routes:RouteRecordRaw[] = [{
  path: '/',
  redirect: '/home',
  component: () => import('@/layout/index.vue'),
  children:[
    {
      path: '/home',
      component: () => import('@/views/home.vue'),
    }
  ]
}]

const router = createRouter({
  history: createMemoryHistory(),
  routes,
})

export default router